home *** CD-ROM | disk | FTP | other *** search
/ Network Support Library / RoseWare - Network Support Library.iso / pressgen / frag.txt < prev    next >
Text File  |  1988-09-17  |  10KB  |  173 lines

  1. From APRIL 1988 LAN TIMES, page 28.
  2.  
  3. Fragments In Performance
  4.  
  5. By John T. McCann
  6.  
  7.      Everyone  wants  more  performance from a  network.  For  personal
  8. computer (PC) users,  defragmenting their hard disk might be a suitable
  9. remedy.  But,  if the same PC users, who have just turned LAN managers,
  10. attempt  to  defragment their network's shared disk,  they'll  find  it
  11. difficult or impossible to locate such a utility for a NetWare network.
  12.  
  13. WHAT'S A FRAGMENTED FILE?
  14.      A  file is called fragmented when it does not  exist  contiguously
  15. (in  a sequential order) on a disk.  Accessing a fragmented file  means
  16. much  time can be wasted waiting for the drive to position  (move)  the
  17. disk's  heads  to  the  next  portion  of  the  file.      Higher  disk
  18. performance is gained from disks that spend less time positioning their
  19. heads,   resulting  in  a  quicker  response  time  and  better  system
  20. performance. 
  21.      On  a  standalone  PC,   higher  disk  performance  is  based   on
  22. contiguously allocated files. Activity of the disk's heads is minimized
  23. to  process  (read  or write) such  files.  Consequently,  contiguously
  24. allocated  files  in a single-user system allow for the  quickest  file
  25. access.
  26.  
  27. THE MULTIUSER DISK
  28.      In a multiuser environment,  contiguous files are most  beneficial
  29. with single-user access.  But unlike on a standalone,  fragmented files
  30. on a shared hard disk are generally not a problem.  To explain why this
  31. is not a problem, some common background needs to be established.
  32.  
  33. REASONS FOR ACCESSING FILES
  34.      There  are  two basic reasons to access files:  for  their  entire
  35. content or for certain segments within the file.
  36.      People  who  access files for their entire content  are  generally
  37. calling up programs, whether compilers, text editors,  word processors,
  38. utilities,   or  applications.   Some  programs  also   need   overlay,
  39. configuration, help, or driver files. Typically, these additional files
  40. are used when a program initially comes up.  Word processing  documents
  41. and spreadsheet data are additional examples of files that are accessed
  42. for their entire content.
  43.      Users  who need only file segments might be calling  up  database,
  44. index  and non-database data files. File segments are  accessed  either
  45. sequentially or randomly.  Users call up file segments much more  often
  46. than they call up initial programs and their additional files.
  47.      A multiuser system can experience fragmentation degradation if the
  48. system  is using First-In-First-Out (FIFO) queue mechanisms  to  access
  49. files.  FIFO mechanisms are DOS-like by nature and perform each read or
  50. write request in order of arrival at the file server, no matter how far
  51. removed the areas to be accessed are from each other.
  52.      FIFO  access  in  a multiuser system can also lead  to  hard  disk
  53. thrashing.  A  disk that spends more time positioning  its  heads  than
  54. accessing data is said to be thrashing.
  55.  
  56. THE NETWARE SOLUTION
  57.      NetWare minimizes thrashing by using an elevator-seeking mechanism
  58. that  logically organizes disk operations as they arrive at the  server
  59. for processing.  As a consequence of elevator-seeking,  the drive heads
  60. operate in a sweeping fashion, from one edge of the disk to the other.
  61.      This intervention by NetWare ensures high throughput from the disk
  62. regardless   of  the  amount  of  activity  requested  or  the   actual
  63. fragmentation of the files being accessed.
  64.      In  addition to elevator-seeking,  NetWare also employs a  caching
  65. mechanism. Caching stores in the server's memory the most recently read
  66. disk  blocks (one disk block is 4KB).  Caching also  temporarily  holds
  67. blocks to be written to disk.
  68.      If the requested data exists in cache,  no physical disk  activity
  69. will  occur to retrieve the data. Writing data to the  cache  minimizes
  70. the  wait  time for the user.  Instead of waiting for the  data  to  be
  71. written  to  the  disk,  the data is written to  cache  and  users  can
  72. continue  their operations.  Cache-stored data will be written to  disk
  73. every three seconds, or when the entire cache buffer is updated.
  74.      For example,  if a file is being updated,  NetWare would store the
  75. data  in  the cache.  Once the data is in the  cache,  the  application
  76. program continues because it thinks the data has been written to  disk.
  77. And  if data in the cache is needed for a read operation before  it  is
  78. written to disk, it will be read from the cache.
  79.      NetWare  speeds  performance  through elevator  seeking  and  disk
  80. caching.  The goal of elevator seeking is to reduce the amount of  time
  81. spent positioning a disk's heads,  while caching eliminates unnecessary
  82. disk  access.  Together,  elevator seeking  and  caching  diminish  the
  83. effects of fragmentation in the NetWare environment.
  84.  
  85. V2.1X FEATURES FAT INDEXING
  86.      Elevator  seeking and caching features are representative  of  all
  87. versions  of Advanced NetWare.  But,  with the arrival of  SFT  NetWare
  88. v2.1,  Novell  is introducing a new feature to  further  decrease  file
  89. access time.
  90.      The new feature is File Allocation Table (FAT) indexing.  The  FAT
  91. is  a singly linked list of pointers to disk blocks  containing  files.
  92. Further,  the FAT is the device which resolves the  logical-to-physical
  93. addresses needed to access files. FAT indexing decreases the time spent
  94. finding a specific FAT entry.
  95.      Access to a certain FAT entry requires the sequential scanning  of
  96. all  entries previous to it.  A file marked for FAT indexing (which  is
  97. much like marking a file to be shareable) has a dynamically constructed
  98. index table containing pointers to that file.
  99.      Using the index table,  NetWare jumps instantly to the needed  FAT
  100. entry  (rather  than  scanning  all  previous  FAT  entries)  on  files
  101. containing no more than 512 4KB blocks or totalling no more than 2MB.
  102.      If a file is initially greater than 2MB, or grows beyond 2MB,  the
  103. indexed  FAT  dynamically begins to index every other FAT  entry.  Even
  104. though  the  file's  size is greater than 2MB and  the  number  of  FAT
  105. entries  pointed  to  by each index  entry  is  increased,  performance
  106. remains higher than sequential FAT access because the FAT index reduces
  107. sequential searches to a very small number.
  108.      Up to 1,000 FAT index tables per server are allowed by SFT NetWare
  109. v2.1. Each FAT index table requires 1KB of memory at the server.
  110.      FAT  indexing is best implemented on files that are  accessed  for
  111. specific segments rather than files accessed for their entire  content.
  112. (Files read for their content are read sequentially,  the same way  the
  113. FAT works.)
  114.  
  115. SOME ALTERNATIVES
  116.      If fragmented files on a NetWare or other network shared hard disk
  117. is  still a concern,  here are some salient areas to consider that  are
  118. proven to increase network performance:
  119.  
  120. ~  Add memory in the file server (more is better).*
  121. ~   Adjust  the cache block size (with versions of  NetWare  v2.0a  and
  122. below,  cache block size can be changed;  4K block size is optimal  for
  123. system speed but uses more memory).*
  124. ~   Increase the speed of the disk channel in the server  (i.e.,  maybe
  125. add a DCB for 286 NetWare).*
  126. ~  Decrease the average access time of shared disk(s).
  127. ~  Increase the processing speed of network workstations.
  128. ~  Increase the number of network cards in the file server and split up
  129. the network cabling to decrease
  130. communication congestion between file server and workstations.*
  131.  
  132.      Performance can increase 10-fold or more by utilizing one or  more
  133. of the above improveme
  134. nts. (The asterisks indicate NetWare-specific enhancements.)
  135.      If none of these enhancements seem adequate,  here is a method  to
  136. defragment any disk:
  137.  
  138. ~   Time certain activities utilizing the disk;  maybe load a  program,
  139. spreadsheet, etc. Try this with no other users logged on the system.
  140. ~  Back up the system completely,  at least twice.  (If it's a  NetWare
  141. system,  and  not  using v2.1,  use some  system  other  than  Novell's
  142. internal tape unit to perform the backup and restore.)
  143. ~   CompSurf  the  disk  in question.  (If  non-NetWare,  reformat  the
  144. specific disk.)
  145. ~  Re-install that disk into the system.
  146. ~  Restore the system.
  147. ~  Do the same time tests as before.
  148. ~  Ask the question, "Was it worth it?"
  149.  
  150.      The  above  steps were performed on  several  NetWare-shared  hard
  151. disks  and  produced no noticeable increase in performance.  The  disks
  152. were all larger than 100MB and had been in service for more than a year
  153. before the test.
  154.      The  whole  premise of fragmented files  limiting  performance  is
  155. based  on  a  single-user system,  or a shared  system  that  practices
  156. single-user  disk  access techniques (such as FIFO).  The fact  that  a
  157. shared disk is in constant motion, due to multiuser access,  supersedes
  158. the benefit of having files contiguously organized.
  159.      Unless a file is processed for its entire content, the next time a
  160. file segment is processed, repositioning disk heads will most likely be
  161. necessary  because the disk heads will probably have moved  to  service
  162. another  user's  request.  Consequently, fragmented files  have  little
  163. effect on system performance in a shared disk environment.
  164.      Through elevator seeking and caching,  decreased performance of  a
  165. NetWare system cannot be directly attributed to fragmented files. 
  166.  
  167. John T.  McCann is the author of the Integrity Software's ANET  Network
  168. Utilities  and SiteLock and has installed over 500 NetWare  systems  in
  169. the past two and a half years.  He is also the Wizard SysOp on  NOVUSER
  170. NetWire,   and   can  be  reached  at  CompuServe  ID   70007,3430   or
  171. 1-800-752-7001 x2807
  172.  
  173.